<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>修改课程</title>
    <link rel="stylesheet" href="/layui/css/layui.css">
</head>
<body>


<table id="demo" lay-filter="test"></table>


<script src="/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'form','table'], function(){
        var layer = layui.layer
            ,form = layui.form
            ,table = layui.table;

        table.render({
            elem: '#demo'
            ,height: 312
            ,url: '/demo/table/user/' //数据接口
            ,page: true //开启分页
            ,cols: [[ //表头
                {field: 'courseId', title: 'ID', width:60},
                {field: 'courseName', title: '课程名称', width:100},
                {field: 'courseTypeId', title: '课程类型', width:100},
                {field: 'tid', title: '主讲老师', width:100},
                {field: 'fitObj', title: '适合对象', width:100},
                {field: 'trnObj', title: '培养目标', width:100},
                {field: 'areaid', title: '市', width:60},
                {field: 'positionid', title: '详细地址', width:100},
                {field: 'gradeiId', title: '班级', width:60},
                {field: 'xkId', title: '学科', width:60},
                {field: 'xqId', title: '学期', width:60},
                {field: 'bcId', title: '班次', width:60},
                {field: 'courseState', title: '课程状态', width:100},
                {field: 'allNumber', title: '总人数', width:80},
                {field: 'gift', title: '礼物', width:60},
                {field: 'courseInfo', title: '课程详情', width:100},
                {field: 'createTime', title: '创建时间', width:100},
                {field: 'updateTime', title: '修改时间', width:100}
            ]]
        });
    });
</script>
</body>
</html>